Skip to main content

Webpack Customization

Catalyst provides ways to customize webpack configuration for specific needs through the webpackConfig.js file.

Catalyst allows customizing webpack's chunk splitting behavior through the splitChunksConfig option

module.exports = {
splitChunksConfig: {
chunks: 'all',
minSize: 20000,
minChunks: 1,
}
};

Some packages are distributed as ESM-only (ECMAScript Modules) and cannot be directly imported in Catalyst's CommonJS environment. To handle these packages, you can use the transpileModules option:

module.exports = {
transpileModules: [
'esm-only-package',
/@scope/another-esm-package/
]
};